ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
EFTracking
FPGATrackSim
FPGATrackSimAlgorithms
src
FPGATrackSimMergeOutputsAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#ifndef FPGATrackSim_MERGEOUTPUTSALG_H
7
#define FPGATrackSim_MERGEOUTPUTSALG_H
8
9
10
#include "
AthenaBaseComps/AthAlgorithm.h
"
11
#include "GaudiKernel/ToolHandle.h"
12
//#include "FPGATrackSimObjects/FPGATrackSimLogicalEventInputHeader.h"
13
//#include "FPGATrackSimObjects/FPGATrackSimLogicalEventOutputHeader.h"
14
//#include "FPGATrackSimObjects/FPGATrackSimTrack.h"
15
#include "
FPGATrackSimObjects/FPGATrackSimTrackCollection.h
"
16
#include "
FPGATrackSimObjects/FPGATrackSimHitCollection.h
"
17
18
#include <vector>
19
20
class
TFile;
21
class
TTree;
22
class
FPGATrackSimTrack
;
23
class
FPGATrackSimOverlapRemovalTool
;
24
class
FPGATrackSimLogicalEventInputHeader
;
25
class
FPGATrackSimLogicalEventOutputHeader
;
26
27
class
FPGATrackSimMergeOutputsAlg
:
public
AthAlgorithm
{
28
public
:
29
FPGATrackSimMergeOutputsAlg
(
const
std::string& name, ISvcLocator* pSvcLocator);
30
virtual
~FPGATrackSimMergeOutputsAlg
() {};
31
virtual
StatusCode
initialize
()
override
;
32
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
33
virtual
StatusCode
finalize
()
override
;
34
35
private
:
36
37
const
static
unsigned
N
=1280;
38
39
Gaudi::Property<std::vector<std::string>>
m_inpaths
{
this
,
"InFileNames"
, {
"."
},
"input file paths"
};
40
Gaudi::Property<bool>
m_SortTracks
{
this
,
"SortTracks"
,
false
,
"If true, sort tracks before finalizing merging, based on track quality"
};
41
std::vector<TFile*>
m_files
;
// vector of pointers to files
42
std::vector<std::vector<TTree*>>
m_trees
;
// vector of ttrees, first vector over the input files, second over the regions
43
std::vector<std::vector<FPGATrackSimLogicalEventOutputHeader*>>
m_eventOutputHeaders
;
//vector of output headers from above trees
44
45
FPGATrackSimLogicalEventInputHeader
*
m_dataprep
=
nullptr
;
// data prep header, we only need one!
46
TTree *
m_dataprep_tree
=
nullptr
;
// data prep ttree, we only need one!
47
48
// output track collection
49
SG::WriteHandleKey<FPGATrackSimTrackCollection>
m_FPGATrackKey
{
this
,
"FPGATrackSimTracks"
,
"FPGATracks"
,
"FPGATrackSim Tracks key"
};
50
SG::WriteHandleKey<FPGATrackSimHitCollection>
m_FPGAHitKey
{
this
,
"FPGATrackSimHitKey"
,
"FPGAHits"
,
"FPGATrackSim Hits key"
};
51
ToolHandle<FPGATrackSimOverlapRemovalTool>
m_overlapRemovalTool
{
this
,
"OverlapRemoval"
,
"FPGATrackSimOverlapRemovalTool/FPGATrackSimOverlapRemovalTool_Last"
,
"Last inter-region overlap removal tool"
};
52
53
Gaudi::Property<unsigned>
m_evtlooptree
{
this
,
"SkipWritingEvents"
, 0,
"Set to the number of events you want to skip at the start"
};
54
55
double
m_evtloop
= 0;
// for counting, make a double because will be for division
56
unsigned
long
m_alltracks
= 0;
57
unsigned
long
m_tracksPassOR
= 0;
58
};
59
60
#endif
// FPGATrackSim_MERGEOUTPUTSALG_H
AthAlgorithm.h
FPGATrackSimHitCollection.h
FPGATrackSimTrackCollection.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
FPGATrackSimLogicalEventInputHeader
Definition
FPGATrackSimLogicalEventInputHeader.h:21
FPGATrackSimLogicalEventOutputHeader
Definition
FPGATrackSimLogicalEventOutputHeader.h:12
FPGATrackSimMergeOutputsAlg::m_evtlooptree
Gaudi::Property< unsigned > m_evtlooptree
Definition
FPGATrackSimMergeOutputsAlg.h:53
FPGATrackSimMergeOutputsAlg::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
FPGATrackSimMergeOutputsAlg.cxx:108
FPGATrackSimMergeOutputsAlg::m_alltracks
unsigned long m_alltracks
Definition
FPGATrackSimMergeOutputsAlg.h:56
FPGATrackSimMergeOutputsAlg::m_eventOutputHeaders
std::vector< std::vector< FPGATrackSimLogicalEventOutputHeader * > > m_eventOutputHeaders
Definition
FPGATrackSimMergeOutputsAlg.h:43
FPGATrackSimMergeOutputsAlg::m_overlapRemovalTool
ToolHandle< FPGATrackSimOverlapRemovalTool > m_overlapRemovalTool
Definition
FPGATrackSimMergeOutputsAlg.h:51
FPGATrackSimMergeOutputsAlg::finalize
virtual StatusCode finalize() override
Definition
FPGATrackSimMergeOutputsAlg.cxx:167
FPGATrackSimMergeOutputsAlg::initialize
virtual StatusCode initialize() override
Definition
FPGATrackSimMergeOutputsAlg.cxx:19
FPGATrackSimMergeOutputsAlg::m_dataprep
FPGATrackSimLogicalEventInputHeader * m_dataprep
Definition
FPGATrackSimMergeOutputsAlg.h:45
FPGATrackSimMergeOutputsAlg::m_files
std::vector< TFile * > m_files
Definition
FPGATrackSimMergeOutputsAlg.h:41
FPGATrackSimMergeOutputsAlg::~FPGATrackSimMergeOutputsAlg
virtual ~FPGATrackSimMergeOutputsAlg()
Definition
FPGATrackSimMergeOutputsAlg.h:30
FPGATrackSimMergeOutputsAlg::m_tracksPassOR
unsigned long m_tracksPassOR
Definition
FPGATrackSimMergeOutputsAlg.h:57
FPGATrackSimMergeOutputsAlg::FPGATrackSimMergeOutputsAlg
FPGATrackSimMergeOutputsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
FPGATrackSimMergeOutputsAlg.cxx:14
FPGATrackSimMergeOutputsAlg::m_SortTracks
Gaudi::Property< bool > m_SortTracks
Definition
FPGATrackSimMergeOutputsAlg.h:40
FPGATrackSimMergeOutputsAlg::m_dataprep_tree
TTree * m_dataprep_tree
Definition
FPGATrackSimMergeOutputsAlg.h:46
FPGATrackSimMergeOutputsAlg::m_FPGAHitKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Definition
FPGATrackSimMergeOutputsAlg.h:50
FPGATrackSimMergeOutputsAlg::m_inpaths
Gaudi::Property< std::vector< std::string > > m_inpaths
Definition
FPGATrackSimMergeOutputsAlg.h:39
FPGATrackSimMergeOutputsAlg::m_evtloop
double m_evtloop
Definition
FPGATrackSimMergeOutputsAlg.h:55
FPGATrackSimMergeOutputsAlg::N
static const unsigned N
Definition
FPGATrackSimMergeOutputsAlg.h:37
FPGATrackSimMergeOutputsAlg::m_trees
std::vector< std::vector< TTree * > > m_trees
Definition
FPGATrackSimMergeOutputsAlg.h:42
FPGATrackSimMergeOutputsAlg::m_FPGATrackKey
SG::WriteHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
Definition
FPGATrackSimMergeOutputsAlg.h:49
FPGATrackSimOverlapRemovalTool
Remove (mark) duplicate tracks This tool takes FPGATrackSimTrack as input and mark their status of pa...
Definition
FPGATrackSimOverlapRemovalTool.h:35
FPGATrackSimTrack
Definition
FPGATrackSimTrack.h:23
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
Generated on
for ATLAS Offline Software by
1.17.0