ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimMatrixReductionAlgo.h
Go to the documentation of this file.
1// Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3#ifndef FPGATrackSimMatrixReductionAlgo_h
4#define FPGATrackSimMatrixReductionAlgo_h
5
22
23
24#include "GaudiKernel/ITHistSvc.h"
28
29class TTree;
30
31#include <string>
32#include <vector>
33
34
36{
37 public:
38
39 FPGATrackSimMatrixReductionAlgo (const std::string& name, ISvcLocator* pSvcLocator);
41 StatusCode initialize() override;
42 StatusCode finalize() override;
43 // Execute does not do anything for this alg. This class does not process events, everything is done in init and finalize
44 StatusCode execute() override;
45
46 private:
47
49 // Handles
50
51 ServiceHandle<IFPGATrackSimMappingSvc> m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc","FPGATrackSimMappingSvc"};
52 ServiceHandle<ITHistSvc> m_tHistSvc {this, "THistSvc","THistSvc"};
55
57 // Configuration
58 Gaudi::Property<bool> m_allregion {this, "allregion", false,"Run all regions?"};
59 Gaudi::Property<std::string> m_filePath {this, "LayerChange_path", "default filepath"};
60 Gaudi::Property<int> m_region {this, "region", 0, "Region to run"};
61 Gaudi::Property<int> m_nRegions {this, "nbank", 96, "Number of regions and thus banks to create"};
62
64 int m_region_end = 0;
65
67 // Data
68
69 std::vector<AccumulateMap> m_sector_cum; // 1st stage accumulate maps, size nRegion.
70
72 // Helper Functions
73
74 StatusCode copySliceTree(TFile *file);
75 std::pair<std::vector<size_t>, std::vector<size_t>> matchStages();
76 std::pair<std::vector<module_t>, FPGATrackSimMatrixAccumulator> reduce(
77 std::vector<module_t> const & modules_2nd, FPGATrackSimMatrixAccumulator const & acc_2nd,
78 std::vector<size_t> const & layers_1st_to_2nd, std::vector<size_t> const & coords_1st_to_2nd);
79 void extract_1stStage(TFile *file);
80};
81
82
83
84
85#endif // FPGATrackSimMatrixReductionAlgo_h
86
Helper struct for accumulating sector information for matrix generation.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual ~FPGATrackSimMatrixReductionAlgo()=default
std::pair< std::vector< module_t >, FPGATrackSimMatrixAccumulator > reduce(std::vector< module_t > const &modules_2nd, FPGATrackSimMatrixAccumulator const &acc_2nd, std::vector< size_t > const &layers_1st_to_2nd, std::vector< size_t > const &coords_1st_to_2nd)
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
FPGATrackSimMatrixReductionAlgo(const std::string &name, ISvcLocator *pSvcLocator)
std::pair< std::vector< size_t >, std::vector< size_t > > matchStages()
TFile * file