ATLAS Offline Software
FPGATrackSimMergeOutputsAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef FPGATrackSim_MERGEOUTPUTSALG_H
7 #define FPGATrackSim_MERGEOUTPUTSALG_H
8 
9 
11 #include "GaudiKernel/ToolHandle.h"
12 //#include "FPGATrackSimObjects/FPGATrackSimLogicalEventInputHeader.h"
13 //#include "FPGATrackSimObjects/FPGATrackSimLogicalEventOutputHeader.h"
14 //#include "FPGATrackSimObjects/FPGATrackSimTrack.h"
17 
18 #include <vector>
19 
20 class TFile;
21 class TTree;
22 class FPGATrackSimTrack;
26 
28 public:
29  FPGATrackSimMergeOutputsAlg (const std::string& name, ISvcLocator* pSvcLocator);
31  virtual StatusCode initialize() override;
32  virtual StatusCode execute() 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 
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  double m_evtloop = 0; // for counting, make a double because will be for division
54  unsigned long m_alltracks = 0;
55  unsigned long m_tracksPassOR = 0;
56 };
57 
58 #endif // FPGATrackSim_MERGEOUTPUTSALG_H
FPGATrackSimMergeOutputsAlg::m_FPGAHitKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Definition: FPGATrackSimMergeOutputsAlg.h:50
FPGATrackSimMergeOutputsAlg::finalize
virtual StatusCode finalize() override
Definition: FPGATrackSimMergeOutputsAlg.cxx:154
FPGATrackSimMergeOutputsAlg::m_tracksPassOR
unsigned long m_tracksPassOR
Definition: FPGATrackSimMergeOutputsAlg.h:55
FPGATrackSimMergeOutputsAlg::m_files
std::vector< TFile * > m_files
Definition: FPGATrackSimMergeOutputsAlg.h:41
FPGATrackSimLogicalEventInputHeader
Definition: FPGATrackSimLogicalEventInputHeader.h:21
FPGATrackSimHitCollection.h
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:18
FPGATrackSimMergeOutputsAlg::execute
virtual StatusCode execute() override
Definition: FPGATrackSimMergeOutputsAlg.cxx:108
FPGATrackSimMergeOutputsAlg::m_overlapRemovalTool
ToolHandle< FPGATrackSimOverlapRemovalTool > m_overlapRemovalTool
Definition: FPGATrackSimMergeOutputsAlg.h:51
AthAlgorithm.h
FPGATrackSimMergeOutputsAlg::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimMergeOutputsAlg.cxx:19
FPGATrackSimMergeOutputsAlg::FPGATrackSimMergeOutputsAlg
FPGATrackSimMergeOutputsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FPGATrackSimMergeOutputsAlg.cxx:14
FPGATrackSimMergeOutputsAlg::m_evtloop
double m_evtloop
Definition: FPGATrackSimMergeOutputsAlg.h:53
SG::WriteHandleKey< FPGATrackSimTrackCollection >
FPGATrackSimTrackCollection.h
FPGATrackSimMergeOutputsAlg::m_trees
std::vector< std::vector< TTree * > > m_trees
Definition: FPGATrackSimMergeOutputsAlg.h:42
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPGATrackSimMergeOutputsAlg::N
static const unsigned N
Definition: FPGATrackSimMergeOutputsAlg.h:37
AthAlgorithm
Definition: AthAlgorithm.h:47
FPGATrackSimMergeOutputsAlg::m_dataprep
FPGATrackSimLogicalEventInputHeader * m_dataprep
Definition: FPGATrackSimMergeOutputsAlg.h:45
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
FPGATrackSimMergeOutputsAlg::m_eventOutputHeaders
std::vector< std::vector< FPGATrackSimLogicalEventOutputHeader * > > m_eventOutputHeaders
Definition: FPGATrackSimMergeOutputsAlg.h:43
FPGATrackSimMergeOutputsAlg::~FPGATrackSimMergeOutputsAlg
virtual ~FPGATrackSimMergeOutputsAlg()
Definition: FPGATrackSimMergeOutputsAlg.h:30
FPGATrackSimMergeOutputsAlg
Definition: FPGATrackSimMergeOutputsAlg.h:27
FPGATrackSimMergeOutputsAlg::m_alltracks
unsigned long m_alltracks
Definition: FPGATrackSimMergeOutputsAlg.h:54
FPGATrackSimMergeOutputsAlg::m_FPGATrackKey
SG::WriteHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
Definition: FPGATrackSimMergeOutputsAlg.h:49
FPGATrackSimMergeOutputsAlg::m_dataprep_tree
TTree * m_dataprep_tree
Definition: FPGATrackSimMergeOutputsAlg.h:46
FPGATrackSimMergeOutputsAlg::m_inpaths
Gaudi::Property< std::vector< std::string > > m_inpaths
Definition: FPGATrackSimMergeOutputsAlg.h:39
FPGATrackSimLogicalEventOutputHeader
Definition: FPGATrackSimLogicalEventOutputHeader.h:12
FPGATrackSimOverlapRemovalTool
Remove (mark) duplicate tracks This tool takes FPGATrackSimTrack as input and mark their status of pa...
Definition: FPGATrackSimOverlapRemovalTool.h:35