ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
MuonD3PDMaker
src
MDTSimHitFillerTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id: MDTSimHitFillerTool.cxx 503989 2012-06-05 16:07:54Z ssnyder $
6
7
// Gaudi/Athena include(s):
8
#include "
AthenaKernel/errorcheck.h
"
9
10
// Local include(s):
11
#include "
MDTSimHitFillerTool.h
"
12
13
namespace
D3PD
{
14
15
MDTSimHitFillerTool::MDTSimHitFillerTool
(
const
std::string&
type
,
16
const
std::string& name,
17
const
IInterface* parent )
18
:
BlockFillerTool
<
MDTSimHit
>(
type
, name, parent )
19
{
20
MDTSimHitFillerTool::book
().ignore();
// Avoid coverity warnings.
21
}
22
23
StatusCode
MDTSimHitFillerTool::book
() {
24
25
CHECK
(
addVariable
(
"globalTime"
,
m_globalTime
,
26
"Add description here..."
) );
27
CHECK
(
addVariable
(
"driftRadius"
,
m_driftRadius
,
28
"Add description here..."
) );
29
CHECK
(
addVariable
(
"stepLength"
,
m_stepLength
,
30
"Add description here..."
) );
31
CHECK
(
addVariable
(
"energyDeposit"
,
m_energyDeposit
,
32
"Add description here..."
) );
33
CHECK
(
addVariable
(
"particleEncoding"
,
m_particleEncoding
,
34
"Add description here..."
) );
35
CHECK
(
addVariable
(
"kineticEnergy"
,
m_kineticEnergy
,
36
"Add description here..."
) );
37
CHECK
(
addVariable
(
"MDTid"
,
m_MDTid
,
38
"Add description here..."
) );
39
CHECK
(
addVariable
(
"trackNumber"
,
m_trackNumber
,
40
"Number of track which released this energy"
) );
41
42
return
StatusCode::SUCCESS;
43
}
44
45
StatusCode
MDTSimHitFillerTool::fill
(
const
MDTSimHit
& obj ) {
46
47
*
m_globalTime
= obj.globalTime();
48
*
m_driftRadius
= obj.driftRadius();
49
*
m_stepLength
= obj.stepLength();
50
*
m_energyDeposit
= obj.energyDeposit();
51
*
m_particleEncoding
= obj.particleEncoding();
52
*
m_kineticEnergy
= obj.kineticEnergy();
53
*
m_MDTid
= obj.MDTid();
54
*
m_trackNumber
= obj.truthBarcode();
55
56
return
StatusCode::SUCCESS;
57
}
58
59
}
// namespace D3PD
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
MDTSimHitFillerTool.h
D3PD::BlockFillerTool< MDTSimHit >::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Definition
AddVariable.cxx:85
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition
BlockFillerTool.h:65
D3PD::MDTSimHitFillerTool::m_energyDeposit
float * m_energyDeposit
Definition
MDTSimHitFillerTool.h:46
D3PD::MDTSimHitFillerTool::m_particleEncoding
int * m_particleEncoding
Definition
MDTSimHitFillerTool.h:47
D3PD::MDTSimHitFillerTool::m_globalTime
float * m_globalTime
Definition
MDTSimHitFillerTool.h:43
D3PD::MDTSimHitFillerTool::m_trackNumber
int * m_trackNumber
Number of track which released this energy.
Definition
MDTSimHitFillerTool.h:50
D3PD::MDTSimHitFillerTool::fill
virtual StatusCode fill(const MDTSimHit &obj)
Function filling the ntuple variables for a single object.
Definition
MDTSimHitFillerTool.cxx:45
D3PD::MDTSimHitFillerTool::MDTSimHitFillerTool
MDTSimHitFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular Gaudi AlgTool constructor.
Definition
MDTSimHitFillerTool.cxx:15
D3PD::MDTSimHitFillerTool::book
virtual StatusCode book()
Function booking the ntuple variables.
Definition
MDTSimHitFillerTool.cxx:23
D3PD::MDTSimHitFillerTool::m_driftRadius
float * m_driftRadius
Definition
MDTSimHitFillerTool.h:44
D3PD::MDTSimHitFillerTool::m_kineticEnergy
float * m_kineticEnergy
Definition
MDTSimHitFillerTool.h:48
D3PD::MDTSimHitFillerTool::m_stepLength
float * m_stepLength
Definition
MDTSimHitFillerTool.h:45
D3PD::MDTSimHitFillerTool::m_MDTid
int * m_MDTid
Definition
MDTSimHitFillerTool.h:49
MDTSimHit
Definition
MDTSimHit.h:21
D3PD
Block filler tool for noisy FEB information.
Definition
CaloCellDetailsFillerTool.cxx:29
type
Generated on
for ATLAS Offline Software by
1.17.0