ATLAS Offline Software
FPGATrackSimRawNtupleWrapperAlg.h
Go to the documentation of this file.
1 #ifndef FPGATrackSim_RAWNTUPLEWRAPPERALG_H
2 #define FPGATrackSim_RAWNTUPLEWRAPPERALG_H
3 
4 
6 #include "GaudiKernel/ToolHandle.h"
9 
10 class TFile;
11 class TTree;
13 class FPGATrackSimHit;
15 
17 
18 public:
19  FPGATrackSimRawNtupleWrapperAlg (const std::string& name, ISvcLocator* pSvcLocator);
20  virtual ~FPGATrackSimRawNtupleWrapperAlg () = default;
21  virtual StatusCode initialize() override;
22  virtual StatusCode execute() override;
23  virtual StatusCode finalize() override;
24 
25 private:
26  // configuration parameters
27  ToolHandle<IFPGATrackSimEventInputHeaderTool> m_hitInputTool { this, "InputTool", "FPGATrackSimSGToRawHitsTool/FPGATrackSimSGToRawHitsTool", "Input Tool" };
28  StringProperty m_outpath {this, "OutFileName", "httsim_smartwrapper.root", "output path"};
29  BooleanProperty m_getOffline {this, "GetOffline", false, "flag to enable the offline tracking save"};
30 
31 
32  // internal pointers
34  unsigned int m_ntowers = 1;
35 
36  // Tree structure
37  TFile *m_outfile = nullptr; // ROOT file descriptor
38  TTree *m_hittree = nullptr; // TTree for the hit storage
39  TTree *m_evtinfo = nullptr;
40  TTree *m_trackstree = nullptr;
41  TTree *m_offline_cluster_tree = nullptr;
42 
43  // Event Info: Add this to an header ?
44  int m_run_number = 0;
45  int m_event_number = 0;
48  int m_LB = 0;
49  int m_BCID = 0;
50  unsigned int m_extendedLevel1ID = 0U;
51  unsigned int m_level1TriggerType = 0U;
52  std::vector<unsigned int> m_level1TriggerInfo;
53  std::vector<FPGATrackSimHit> *m_original_hits = nullptr; // variables related to the FPGATrackSimHit storage
54  std::vector<FPGATrackSimTruthTrack> m_truth_tracks;
55  //offline clusters
56  std::vector<float> *m_offline_locX = nullptr;
57  std::vector<float> *m_offline_locY = nullptr;
58  std::vector<int> *m_offline_isPixel = nullptr;
59  std::vector<int> *m_offline_isBarrel = nullptr;
60  std::vector<int> *m_offline_layer = nullptr;
61  std::vector<int> *m_offline_clustID = nullptr;
62  std::vector<int> *m_offline_trackNumber = nullptr;
63 
64  //offline tracks
65  std::vector<float> *m_offline_eta = nullptr;
66  std::vector<float> *m_offline_phi = nullptr;
67  std::vector<float> *m_offline_d0 = nullptr;
68  std::vector<float> *m_offline_z0 = nullptr;
69  std::vector<float> *m_offline_qoverpt = nullptr;
70  std::vector<int> *m_offline_barcode = nullptr;
71  std::vector<float> *m_offline_barcode_frac = nullptr;
72 };
73 
74 #endif // FPGATrackSimSGRORAWHITSWRAPPERALG_h
FPGATrackSimRawNtupleWrapperAlg::m_offline_barcode_frac
std::vector< float > * m_offline_barcode_frac
Definition: FPGATrackSimRawNtupleWrapperAlg.h:71
FPGATrackSimRawNtupleWrapperAlg::m_outpath
StringProperty m_outpath
Definition: FPGATrackSimRawNtupleWrapperAlg.h:28
FPGATrackSimRawNtupleWrapperAlg::m_getOffline
BooleanProperty m_getOffline
Definition: FPGATrackSimRawNtupleWrapperAlg.h:29
FPGATrackSimRawNtupleWrapperAlg::m_truth_tracks
std::vector< FPGATrackSimTruthTrack > m_truth_tracks
Definition: FPGATrackSimRawNtupleWrapperAlg.h:54
FPGATrackSimRawNtupleWrapperAlg::m_offline_locY
std::vector< float > * m_offline_locY
Definition: FPGATrackSimRawNtupleWrapperAlg.h:57
FPGATrackSimTruthTrack
Definition: FPGATrackSimTruthTrack.h:14
FPGATrackSimRawNtupleWrapperAlg::m_level1TriggerInfo
std::vector< unsigned int > m_level1TriggerInfo
Definition: FPGATrackSimRawNtupleWrapperAlg.h:52
FPGATrackSimRawNtupleWrapperAlg::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimRawNtupleWrapperAlg.cxx:17
FPGATrackSimRawNtupleWrapperAlg::m_hitInputTool
ToolHandle< IFPGATrackSimEventInputHeaderTool > m_hitInputTool
Definition: FPGATrackSimRawNtupleWrapperAlg.h:27
FPGATrackSimRawNtupleWrapperAlg::m_offline_d0
std::vector< float > * m_offline_d0
Definition: FPGATrackSimRawNtupleWrapperAlg.h:67
FPGATrackSimRawNtupleWrapperAlg::m_offline_isBarrel
std::vector< int > * m_offline_isBarrel
Definition: FPGATrackSimRawNtupleWrapperAlg.h:59
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
FPGATrackSimRawNtupleWrapperAlg::m_trackstree
TTree * m_trackstree
TTree with general event information.
Definition: FPGATrackSimRawNtupleWrapperAlg.h:40
AthAlgorithm.h
FPGATrackSimRawNtupleWrapperAlg::m_hittree
TTree * m_hittree
Definition: FPGATrackSimRawNtupleWrapperAlg.h:38
FPGATrackSimRawNtupleWrapperAlg::FPGATrackSimRawNtupleWrapperAlg
FPGATrackSimRawNtupleWrapperAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FPGATrackSimRawNtupleWrapperAlg.cxx:12
FPGATrackSimRawNtupleWrapperAlg::m_level1TriggerType
unsigned int m_level1TriggerType
Definition: FPGATrackSimRawNtupleWrapperAlg.h:51
FPGATrackSimRawNtupleWrapperAlg::m_offline_phi
std::vector< float > * m_offline_phi
Definition: FPGATrackSimRawNtupleWrapperAlg.h:66
FPGATrackSimRawNtupleWrapperAlg::~FPGATrackSimRawNtupleWrapperAlg
virtual ~FPGATrackSimRawNtupleWrapperAlg()=default
FPGATrackSimRawNtupleWrapperAlg::m_offline_eta
std::vector< float > * m_offline_eta
Definition: FPGATrackSimRawNtupleWrapperAlg.h:65
FPGATrackSimRawNtupleWrapperAlg::m_offline_locX
std::vector< float > * m_offline_locX
Definition: FPGATrackSimRawNtupleWrapperAlg.h:56
FPGATrackSimRawNtupleWrapperAlg::m_averageInteractionsPerCrossing
float m_averageInteractionsPerCrossing
event number
Definition: FPGATrackSimRawNtupleWrapperAlg.h:46
FPGATrackSimRawNtupleWrapperAlg::m_offline_isPixel
std::vector< int > * m_offline_isPixel
Definition: FPGATrackSimRawNtupleWrapperAlg.h:58
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPGATrackSimRawNtupleWrapperAlg::m_event_number
int m_event_number
event's run number
Definition: FPGATrackSimRawNtupleWrapperAlg.h:45
FPGATrackSimEventInputHeader
Definition: FPGATrackSimEventInputHeader.h:22
FPGATrackSimRawNtupleWrapperAlg::m_actualInteractionsPerCrossing
float m_actualInteractionsPerCrossing
Definition: FPGATrackSimRawNtupleWrapperAlg.h:47
FPGATrackSimRawNtupleWrapperAlg::m_original_hits
std::vector< FPGATrackSimHit > * m_original_hits
Definition: FPGATrackSimRawNtupleWrapperAlg.h:53
FPGATrackSimRawNtupleWrapperAlg::m_offline_trackNumber
std::vector< int > * m_offline_trackNumber
Definition: FPGATrackSimRawNtupleWrapperAlg.h:62
AthAlgorithm
Definition: AthAlgorithm.h:47
FPGATrackSimRawNtupleWrapperAlg::m_BCID
int m_BCID
Definition: FPGATrackSimRawNtupleWrapperAlg.h:49
FPGATrackSimRawNtupleWrapperAlg::m_outfile
TFile * m_outfile
Definition: FPGATrackSimRawNtupleWrapperAlg.h:37
FPGATrackSimRawNtupleWrapperAlg::finalize
virtual StatusCode finalize() override
Definition: FPGATrackSimRawNtupleWrapperAlg.cxx:196
FPGATrackSimRawNtupleWrapperAlg::m_offline_barcode
std::vector< int > * m_offline_barcode
Definition: FPGATrackSimRawNtupleWrapperAlg.h:70
FPGATrackSimRawNtupleWrapperAlg::m_eventHeader
FPGATrackSimEventInputHeader * m_eventHeader
Definition: FPGATrackSimRawNtupleWrapperAlg.h:33
FPGATrackSimRawNtupleWrapperAlg::m_extendedLevel1ID
unsigned int m_extendedLevel1ID
Definition: FPGATrackSimRawNtupleWrapperAlg.h:50
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
FPGATrackSimRawNtupleWrapperAlg::m_offline_clustID
std::vector< int > * m_offline_clustID
Definition: FPGATrackSimRawNtupleWrapperAlg.h:61
FPGATrackSimRawNtupleWrapperAlg::m_offline_qoverpt
std::vector< float > * m_offline_qoverpt
Definition: FPGATrackSimRawNtupleWrapperAlg.h:69
FPGATrackSimRawNtupleWrapperAlg::m_offline_layer
std::vector< int > * m_offline_layer
Definition: FPGATrackSimRawNtupleWrapperAlg.h:60
FPGATrackSimRawNtupleWrapperAlg::m_ntowers
unsigned int m_ntowers
Definition: FPGATrackSimRawNtupleWrapperAlg.h:34
FPGATrackSimRawNtupleWrapperAlg::m_evtinfo
TTree * m_evtinfo
Definition: FPGATrackSimRawNtupleWrapperAlg.h:39
IFPGATrackSimEventInputHeaderTool.h
FPGATrackSimRawNtupleWrapperAlg
Definition: FPGATrackSimRawNtupleWrapperAlg.h:16
FPGATrackSimRawNtupleWrapperAlg::execute
virtual StatusCode execute() override
Definition: FPGATrackSimRawNtupleWrapperAlg.cxx:97
FPGATrackSimRawNtupleWrapperAlg::m_offline_cluster_tree
TTree * m_offline_cluster_tree
Definition: FPGATrackSimRawNtupleWrapperAlg.h:41
FPGATrackSimRawNtupleWrapperAlg::m_LB
int m_LB
Definition: FPGATrackSimRawNtupleWrapperAlg.h:48
FPGATrackSimRawNtupleWrapperAlg::m_offline_z0
std::vector< float > * m_offline_z0
Definition: FPGATrackSimRawNtupleWrapperAlg.h:68
FPGATrackSimRawNtupleWrapperAlg::m_run_number
int m_run_number
Definition: FPGATrackSimRawNtupleWrapperAlg.h:44
FPGATrackSimTruthTrack.h