ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkExtrapolation
TrkExAlgs
src
PropResultRootWriterSvc.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrkExAlgs/PropResultRootWriterSvc.h
"
6
#include "TFile.h"
7
#include <vector>
8
#include <deque>
9
#include <mutex>
10
#include <thread>
11
12
13
14
Trk::PropResultRootWriterSvc::PropResultRootWriterSvc
(
const
std::string& name, ISvcLocator* svc)
15
:
AthService
(name, svc),
16
m_thistSvc
(
"THistSvc"
, name),
17
m_tree
(nullptr) {
18
}
19
20
Trk::PropResultRootWriterSvc::~PropResultRootWriterSvc
() =
default
;
21
22
StatusCode
Trk::PropResultRootWriterSvc::initialize
() {
23
ATH_CHECK
(AthService::initialize());
24
25
CHECK
(
m_thistSvc
.retrieve());
26
27
const
std::string treeName =
m_treeName
;
28
m_tree
=
new
TTree(treeName.data(),
"MyStudies"
);
29
30
std::string fullNtupleName =
static_cast<
std::string
>
(
m_ntupleDirName
) +
m_treeName
;
31
CHECK
(
m_thistSvc
->regTree(fullNtupleName,
m_tree
));
32
33
if
(
m_tree
==
nullptr
) {
34
ATH_MSG_ERROR
(
"Unable to create TTree"
);
35
return
StatusCode::FAILURE;
36
}
37
38
m_tree
->Branch(
"event_nr"
, &
m_eventNum
);
39
40
m_tree
->Branch(
"start_d0"
, &
m_start_d0
);
41
m_tree
->Branch(
"start_z0"
, &
m_start_z0
);
42
m_tree
->Branch(
"start_phi"
, &
m_start_phi
);
43
m_tree
->Branch(
"start_theta"
, &
m_start_theta
);
44
m_tree
->Branch(
"start_qop"
, &
m_start_qop
);
45
46
m_tree
->Branch(
"fwd_success"
, &
m_fwd_success
);
47
m_tree
->Branch(
"fwd_time"
, &
m_fwd_time
);
48
m_tree
->Branch(
"fwd_final_l0"
, &
m_fwd_final_l0
);
49
m_tree
->Branch(
"fwd_final_l1"
, &
m_fwd_final_l1
);
50
m_tree
->Branch(
"fwd_final_x"
, &
m_fwd_final_x
);
51
m_tree
->Branch(
"fwd_final_y"
, &
m_fwd_final_y
);
52
m_tree
->Branch(
"fwd_final_z"
, &
m_fwd_final_z
);
53
m_tree
->Branch(
"fwd_final_phi"
, &
m_fwd_final_phi
);
54
m_tree
->Branch(
"fwd_final_theta"
, &
m_fwd_final_theta
);
55
m_tree
->Branch(
"fwd_final_qop"
, &
m_fwd_final_qop
);
56
m_tree
->Branch(
"fwd_final_sigma_l0"
, &
m_fwd_final_sigma_l0
);
57
m_tree
->Branch(
"fwd_final_sigma_l1"
, &
m_fwd_final_sigma_l1
);
58
m_tree
->Branch(
"fwd_final_sigma_phi"
, &
m_fwd_final_sigma_phi
);
59
m_tree
->Branch(
"fwd_final_sigma_theta"
, &
m_fwd_final_sigma_theta
);
60
m_tree
->Branch(
"fwd_final_sigma_qop"
, &
m_fwd_final_sigma_qop
);
61
62
m_tree
->Branch(
"bkw_success"
, &
m_bkw_success
);
63
m_tree
->Branch(
"bkw_time"
, &
m_bkw_time
);
64
m_tree
->Branch(
"bkw_final_d0"
, &
m_bkw_final_d0
);
65
m_tree
->Branch(
"bkw_final_z0"
, &
m_bkw_final_z0
);
66
m_tree
->Branch(
"bkw_final_phi"
, &
m_bkw_final_phi
);
67
m_tree
->Branch(
"bkw_final_theta"
, &
m_bkw_final_theta
);
68
m_tree
->Branch(
"bkw_final_qop"
, &
m_bkw_final_qop
);
69
m_tree
->Branch(
"bkw_final_sigma_d0"
, &
m_bkw_final_sigma_d0
);
70
m_tree
->Branch(
"bkw_final_sigma_z0"
, &
m_bkw_final_sigma_z0
);
71
m_tree
->Branch(
"bkw_final_sigma_phi"
, &
m_bkw_final_sigma_phi
);
72
m_tree
->Branch(
"bkw_final_sigma_theta"
, &
m_bkw_final_sigma_theta
);
73
m_tree
->Branch(
"bkw_final_sigma_qop"
, &
m_bkw_final_sigma_qop
);
74
75
return
StatusCode::SUCCESS;
76
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x,...)
Definition
AthMsgStreamMacros.h:47
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
PropResultRootWriterSvc.h
AthService::AthService
AthService()
Trk::PropResultRootWriterSvc::m_bkw_final_d0
float m_bkw_final_d0
Definition
PropResultRootWriterSvc.h:70
Trk::PropResultRootWriterSvc::m_bkw_final_sigma_z0
float m_bkw_final_sigma_z0
Definition
PropResultRootWriterSvc.h:76
Trk::PropResultRootWriterSvc::m_tree
TTree * m_tree
Definition
PropResultRootWriterSvc.h:40
Trk::PropResultRootWriterSvc::m_ntupleDirName
Gaudi::Property< std::string > m_ntupleDirName
Definition
PropResultRootWriterSvc.h:41
Trk::PropResultRootWriterSvc::m_bkw_final_sigma_qop
float m_bkw_final_sigma_qop
Definition
PropResultRootWriterSvc.h:79
Trk::PropResultRootWriterSvc::m_bkw_final_theta
float m_bkw_final_theta
Definition
PropResultRootWriterSvc.h:73
Trk::PropResultRootWriterSvc::m_eventNum
int m_eventNum
Definition
PropResultRootWriterSvc.h:44
Trk::PropResultRootWriterSvc::m_fwd_final_sigma_l1
float m_fwd_final_sigma_l1
Definition
PropResultRootWriterSvc.h:63
Trk::PropResultRootWriterSvc::m_fwd_final_theta
float m_fwd_final_theta
Definition
PropResultRootWriterSvc.h:60
Trk::PropResultRootWriterSvc::m_fwd_final_sigma_l0
float m_fwd_final_sigma_l0
Definition
PropResultRootWriterSvc.h:62
Trk::PropResultRootWriterSvc::m_fwd_final_l1
float m_fwd_final_l1
Definition
PropResultRootWriterSvc.h:55
Trk::PropResultRootWriterSvc::m_fwd_final_phi
float m_fwd_final_phi
Definition
PropResultRootWriterSvc.h:59
Trk::PropResultRootWriterSvc::m_bkw_time
float m_bkw_time
Definition
PropResultRootWriterSvc.h:69
Trk::PropResultRootWriterSvc::m_fwd_time
float m_fwd_time
Definition
PropResultRootWriterSvc.h:53
Trk::PropResultRootWriterSvc::m_bkw_final_qop
float m_bkw_final_qop
Definition
PropResultRootWriterSvc.h:74
Trk::PropResultRootWriterSvc::m_start_d0
float m_start_d0
Definition
PropResultRootWriterSvc.h:46
Trk::PropResultRootWriterSvc::m_start_z0
float m_start_z0
Definition
PropResultRootWriterSvc.h:47
Trk::PropResultRootWriterSvc::~PropResultRootWriterSvc
virtual ~PropResultRootWriterSvc()
destructor
Trk::PropResultRootWriterSvc::m_treeName
Gaudi::Property< std::string > m_treeName
Definition
PropResultRootWriterSvc.h:42
Trk::PropResultRootWriterSvc::m_fwd_final_z
float m_fwd_final_z
Definition
PropResultRootWriterSvc.h:58
Trk::PropResultRootWriterSvc::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition
PropResultRootWriterSvc.h:39
Trk::PropResultRootWriterSvc::m_bkw_final_sigma_phi
float m_bkw_final_sigma_phi
Definition
PropResultRootWriterSvc.h:77
Trk::PropResultRootWriterSvc::m_fwd_final_l0
float m_fwd_final_l0
Definition
PropResultRootWriterSvc.h:54
Trk::PropResultRootWriterSvc::m_fwd_final_x
float m_fwd_final_x
Definition
PropResultRootWriterSvc.h:56
Trk::PropResultRootWriterSvc::m_start_theta
float m_start_theta
Definition
PropResultRootWriterSvc.h:49
Trk::PropResultRootWriterSvc::m_bkw_final_sigma_d0
float m_bkw_final_sigma_d0
Definition
PropResultRootWriterSvc.h:75
Trk::PropResultRootWriterSvc::initialize
virtual StatusCode initialize() override
Definition
PropResultRootWriterSvc.cxx:22
Trk::PropResultRootWriterSvc::m_fwd_final_sigma_phi
float m_fwd_final_sigma_phi
Definition
PropResultRootWriterSvc.h:64
Trk::PropResultRootWriterSvc::PropResultRootWriterSvc
PropResultRootWriterSvc(const std::string &name, ISvcLocator *svcloc)
constructor
Definition
PropResultRootWriterSvc.cxx:14
Trk::PropResultRootWriterSvc::m_fwd_success
float m_fwd_success
Definition
PropResultRootWriterSvc.h:52
Trk::PropResultRootWriterSvc::m_fwd_final_qop
float m_fwd_final_qop
Definition
PropResultRootWriterSvc.h:61
Trk::PropResultRootWriterSvc::m_start_phi
float m_start_phi
Definition
PropResultRootWriterSvc.h:48
Trk::PropResultRootWriterSvc::m_bkw_success
float m_bkw_success
Definition
PropResultRootWriterSvc.h:68
Trk::PropResultRootWriterSvc::m_start_qop
float m_start_qop
Definition
PropResultRootWriterSvc.h:50
Trk::PropResultRootWriterSvc::m_bkw_final_sigma_theta
float m_bkw_final_sigma_theta
Definition
PropResultRootWriterSvc.h:78
Trk::PropResultRootWriterSvc::m_bkw_final_z0
float m_bkw_final_z0
Definition
PropResultRootWriterSvc.h:71
Trk::PropResultRootWriterSvc::m_fwd_final_y
float m_fwd_final_y
Definition
PropResultRootWriterSvc.h:57
Trk::PropResultRootWriterSvc::m_bkw_final_phi
float m_bkw_final_phi
Definition
PropResultRootWriterSvc.h:72
Trk::PropResultRootWriterSvc::m_fwd_final_sigma_qop
float m_fwd_final_sigma_qop
Definition
PropResultRootWriterSvc.h:66
Trk::PropResultRootWriterSvc::m_fwd_final_sigma_theta
float m_fwd_final_sigma_theta
Definition
PropResultRootWriterSvc.h:65
Generated on
for ATLAS Offline Software by
1.17.0